<script type="text/javascript" src="/js/admin/category.js"> </script>
 <table>
      <thead>
        <tr>
          <th colspan="5">
            Category Manger 
             <button onclick="addCategory()" title="add">ADD</button>

          </th>
        </tr>
      </thead>

      <tbody >
        <tr>
          <th style="width:10%">Index</th>
          <th style="width:20%">Name</th>
          <th style="width:20%">Count</th>
          <th style="width:30%">Time</th>
          <th style="width:20%">Operator</th>
        </tr>
        
        <#list categorys as cat>

          <tr>
            <td style="width:10%">${cat_index+1+(page-1)*15}</td>
            <td style="width:30%" class="name">${cat.name}</td>
            <td style="width:10%">${cat.count}</td>
            <td style="width:30%">${cat.createdTime?string("yyyy-MM-dd HH:mm:ss")}</td>
            <td style="width:20%">
              <button class="delete" onclick="delCategory('${cat.name}','${cat.id}')" >
                删除
              </button>
            </td>
          </tr>
        </#list>

		</tbody>

    </table>
  <br />

<table width="100%">
	<tbody>
	<tr>
        <th id="hdrPlus" class="small" align="right">
        	<#if (page-1>0)>
        	<button onclick="pre('${page-1}')">上一页</button>
        	</#if>
        	&nbsp共${catSize}条&nbsp&nbsp
        	<#if ((page)<((catSize/15)?ceiling))>
        	<button onclick="next('${page+1}')">下一页</button>
        	</#if>
        	
        </th>
    </tr>
	</tbody>
</table>
